home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
pull20.zip
/
PULLSTAT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-11
|
30KB
|
718 lines
{ =========================================================================== }
{ PullStat.pas - User Statistics for pull-down menus. ver 2.0, 01-12-87 }
{ }
{ This file contains all the data for GetUserPullStats, GetOverrideStats and }
{ CheckGlobalKeys to configure the menus. }
{ =========================================================================== }
{$R-,S-,I-,D-,T-,F-,V-,B-,N-,L+ }
UNIT PullStat;
INTERFACE
uses
CRT,Qwik,WndwVars,PullVars,Pull,PullDir;
{ ------------------ Set up your window names here in order: ---------------- }
{ This is optional, but it sure helps you in not only understanding the
program, but also makes it unquestionably easier to rearrange. }
type
MainMenuNames = (NoMainMenu,FilesMenu,ColorMenu,AutoPartsMenu,EnterDataMenu,
OptionsMenu,UtilitiesMenu,IRSmenu,QuitMenu);
SubMenuNames = (NoSubMenu,TiresMenu,RadioMenu,UpdateMenu,DateMenu,
BrandsMenu);
DataWndwNames = (NoDW,BytesDW,WordsDW,IntegersDW,LongIntsDW,RealsDW,HexDW,
CharsDW,StringsDW,PathDW,FileMaskDW,DateDW,YearDW);
HelpWndwNames = (NoHW,WorkWndwHW,TopMenuHW,FilesMenuHW,DirectoryMenuHW,
BrandsMenuHW,EnterDataMenuHW,IRSmenuHW,DateMenuHW,
UpdateMenuHW,ExecChoiceHW,SingleChoiceHW,MultipleChoiceHW,
NumericHW,TextHW);
HelpLineNames = (NoHL, { HL - HelpLine; L - Last }
HLw1,HLw2,HLw3,HLw4,HLw5,HLw6, { Work window }
HLw7,HLw8,HLw9,HLw10,HLwL,
HLt1,HLtL, { Top menu }
HLb1,HLb2,HLb3,HLb4,HLb5, { Brands submenu }
HLb6,HLb7,HLbL,
HLf1,HLf2,HLf3,HLf4,HLf5, { Files submenu }
HLf6,HLf7,HLf8,HLf9,HLfL,
HLdir1,HLdir2,HLdir3,HLdir4,HLdir5, { Directory submenu }
HLdir6,HLdir7,HLdir8,HLdir9,HLdirL,
HLe1,HLe2,HLe3,HLe4,HLe5, { Enter data submenu }
HLe6,HLe7,HLe8,HLe9,HLe10,
HLe11,HLe12,HLe13,HLe14,HLeL,
HLi1,HLi2,HLiL, { IRS menu }
HLd1,HLd2,HLd3,HLdL, { Date submenu }
HLu1,HLu2,HLuL, { Update submenu }
HLx1,HLx2,HLxL, { eXecute choice menu }
HLs1,HLs2,HLsL, { Single choice menu }
HLm1,HLm2,HLmL, { Multiple choice menu }
HLn1,HLn2,HLnL, { Numeric data entry window }
HLtx1,HLtx2,HLtxL); { Text data entry window }
{ Careful! - Always test your last main menu, submenu, data window, and help
window for run-time error! It makes sure you have allotted enough memory
with your constants. The compiler cannot check it with these typed scalars.}
procedure GetUserPullStats;
procedure GetOverrideStats;
procedure CheckGlobalKeys;
IMPLEMENTATION
{ ************************ GetUserPullStats ********************************* }
{ The major configurations for all menus go here. The program first clears }
{ all RECORD values to $00. The values below will set new values. Therefore, }
{ setting RECORD values to "false" or the like is not necessary. }
{ --------------------------------------------------------------------------- }
procedure GetUserPullStats;
begin
LocationWarning:=true; { If true and a Submenu won't fit, a message is
displayed. (It says "Too many Windows", but this
will be changed next time.) If false, you can
override the location without the message. }
{ ------------------ Set up your colors and borders here: ---------------- }
TopMenuAttr:= black+LightGrayBG; TopMenuHattr:= white+BlackBG;
MainMenuBattr:=lightgray+BlackBG;
MainMenuHattr:=black+LightGrayBG; MainMenuLattr:=yellow+BlackBG;
MainMenuCattr:=lightgray+BlackBG;
SubMenuWattr:= black+CyanBG; SubMenuBattr:= black+CyanBG;
if VideoMode=7 then
begin
TopMenuLattr :=TopMenuAttr;
MainMenuWattr:=lightgray+BlackBG;
SubMenuHattr :=black +LightGrayBG;
SubMenuLattr :=white +BlackBG;
SubMenuCattr :=lightgray+BlackBG;
end
else
begin
TopMenuLattr :=red +LightGrayBG;
MainMenuWattr:=white+BlackBG;
SubMenuHattr :=white+BlueBG;
SubMenuLattr :=white+CyanBG;
SubMenuCattr :=blue +CyanBG;
end;
DataWndwWattr:=black+BrownBG; DataWndwBattr:=black+BrownBG;
HelpWndwWattr:=black+GreenBG; HelpWndwBattr:=black+LightGrayBG;
MsgLineAttr :=green+BlackBG; KeyStatusAttr:=black+GreenBG;
Brdr[UserBrdr1].BrdrArray:='╒═╕││└─┘╞═╡╤│┴╪';
MainMenuBrdr:=UserBrdr1; SubMenuBrdr :=SingleBrdr;
DataWndwBrdr:=HdoubleBrdr; HelpWndwBrdr:=HdoubleBrdr;
HelpWndwModes:=ZoomMode+ShadowRight;
RowsBelowHelp:=4; RowsBelowMsg:=0;
{ ------------------------- Top Menu defaults ----------------------------- }
TopMenuRow:=2; { Top menu to appear on row 2 }
MPulled:=3; { Main menu title to be HiLited when F10 is pressed. }
MoreCmdSeq:='ATB'; { Sequence of command letter(s) as if keyed in. This }
{ will be the default menu(s) pulled. }
PullDown:=false; { Set this true if you want the command sequence}
{ to pull down the menus at startup. }
{ ------------------- Set up your MainMenu records here: ------------------ }
MainMenuRow:=3; { First row of Main menus to appear on screen row 3 }
with MainMenu[ord(FilesMenu)] do
begin
MenuMode:=ExecSingleChoice; SingleFlagLine:=5;
Title:='Files';
Line[1]:='Path'; LineMode[1]:=ToDataWndw;
LinkNum [1]:=ord(PathDW);
Line[2]:='Mask for Directory'; LineMode[2]:=ToDataWndw;
LinkNum [2]:=ord(FileMaskDW);
Line[3]:='Directory'; LineMode[3]:=ToUserWndw;
Line[4]:='──────────────────'; LineMode[4]:=Comment;
Line[5]:='Merge';
Line[6]:='make Backup';
Line[7]:='text Out';
Line[8]:=''; LineMode[8]:=Partition;
Line[9]:='Help comment'; LineMode[9]:=Comment;
MenuLines:=9; DefaultLine:=3;
MsgLineNum:=3; HelpWndwNum:=ord(FilesMenuHW);
end;
with MainMenu[ord(ColorMenu)] do
begin
MenuMode:=SingleChoice; SingleFlagLine:=2;
Title:='Color';
Line[1]:='Blue';
Line[2]:='Green';
Line[3]:='Orange';
Line[4]:='Yellow';
Line[5]:='Red';
Line[6]:='Cyan';
Line[7]:='Ultraviolet';
MenuLines:=7; DefaultLine:=5;
MsgLineNum:=3; HelpWndwNum:=ord(SingleChoiceHW);
end;
with MainMenu[ord(AutoPartsMenu)] do
begin
MenuMode:=MultipleChoice;
Title:='AutoParts';
Line[1]:='Tires'; LineMode[1]:=ToSubMenu;
LinkNum [1]:=ord(TiresMenu);
Line[2]:='Radio'; LineMode[2]:=ToSubMenu;
LinkNum [2]:=ord(RadioMenu);
Line[3]:='Seats'; LineMode[3]:=ToDataWndw;
LinkNum [3]:=ord(BytesDW);
Line[4]:='Mirrors'; Flagged[4]:=true;
Line[5]:='Locks';
Line[6]:='HiBeams'; Flagged[6]:=true;
Line[7]:='Wheels';
MenuLines:=7; DefaultLine:=1;
MsgLineNum:=3; HelpWndwNum:=ord(MultipleChoiceHW);
end;
with MainMenu[ord(EnterDataMenu)] do
begin
MenuMode:=MultipleChoice;
Title:='EnterData';
Line[1]:='Byte'; LineMode[1]:=ToDataWndw;
LinkNum [1]:=ord(BytesDW);
Line[2]:='Word'; LineMode[2]:=ToDataWndw;
LinkNum [2]:=or